package com.yowasa.xiuxian.engine.battle.buff;

import com.yowasa.xiuxian.annoations.Buff;
import com.yowasa.xiuxian.entity.bo.battle.BattleContent;
import com.yowasa.xiuxian.entity.bo.battle.BuffContent;
import com.yowasa.xiuxian.entity.bo.battle.UserBattleContent;

@Buff(name = "深渊凝视")
public class ShenYuanNingShiBuff implements BuffInterface {

    @Override
    public void beforeBuffAction(UserBattleContent first, UserBattleContent second, BattleContent content) {
        BuffContent buff = first.getBuff().get("深渊凝视");
        if (buff.getDuration() ==1){
            first.getBuff().get("深渊凝视").setNum(0);
            first.getBuff().get("深渊凝视").setDuration(0);
            first.getBattleInfo().setChp(first.getBattleInfo().getChp() - 1000);
            content.getMsgLog().add("深渊的凝视传来极大的恶意，"+first.getUserBO().getName() + "失去了1000点hp");
        }

    }
}
